package com.dmgis.qxfw.dataservice.businessservice.common.util;

import com.dmgis.qxfw.dataservice.businessservice.common.domain.CEntity;

import java.util.Comparator;
/**
 * This class is used for 面实体排序
 */

class SortByColor implements Comparator<Object> {
    public int compare(Object o1, Object o2) {
        CEntity entity1 = (CEntity) o1;
        CEntity entity2 = (CEntity) o2;
        if (Integer.parseInt(entity1.getColor()) > Integer.parseInt(entity2.getColor()))
            return 1;
        return -1;
    }
}